Beginning Lua with World of Warcraft Addons by Paul Emmerich

Beginning Lua with World of Warcraft Addons by Paul Emmerich

Author:Paul Emmerich [Paul Emmerich]
Language: eng
Format: epub
Tags: Game Development
Publisher: Apress
Published: 2009-07-28T21:00:00+00:00


There are more suffixes with even more arguments. Appendix B contains a table that lists all arguments for all combat log events.

Let's see a practical use for these events now.

Building an Event Handler

Dealing with a subevent is essentially no different than with a normal event, so you can just use your normal event handler. But it might be sometimes useful to treat the subevents like real events. The following code shows an event handler that does this:

MyMod = {}

local function onEvent(self, event, ...)

if event == "COMBAT_LOG_EVENT_UNFILTERED" then

return onEvent(self, select(2, ...), ...)

elseif MyMod[event] then

return MyMod[event](...)

end

end



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.